package com.atguigu.gulimall.auth.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.auth.vo.LoginVo;
import com.atguigu.gulimall.auth.vo.RegisterVo;
import com.atguigu.gulimall.auth.vo.SocialUserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @DESCRIPTION: 远程调用会员注册服务
 * @author: zr
 * @DATE: 2022/01/01 22:54
 */
@FeignClient(value = "gulimall-member", path = "/member/member")
public interface MemberFeignService {
    /**
     * 远程注册会员服务
     *
     * @param registerVo
     * @return
     */
    @PostMapping("/register")
    R register(@RequestBody RegisterVo registerVo);

    /**
     * 远程登录服务
     *
     * @param loginVo
     * @return
     */
    @PostMapping("/login")
    R login(@RequestBody LoginVo loginVo);

    /**
     * 社交登录
     * @param socialUserVo
     * @return
     */
    @PostMapping("/oAuth/login")
    R oAuthLogin(@RequestBody SocialUserVo socialUserVo);
}
